<template>
  <l-layout class="l-tab-page">
    <l-table :columns="lr_getPageColumns(columns)" :dataSource="tableShowData" row-key="f_Id" default-expand-all>
      <!--
            <template v-slot:f_TenantType="scope" >
                {{scope.row.f_TenantType==0 ?"普通租户":"系统平台租户"}}
            </template>
        	-->
      <template v-slot:apiType="scope">
        <el-tag type="success">{{ scope.row.apiType == 0 ? "输入接口" : "输出接口" }}</el-tag>
      </template>
      <l-table-btns :btns="tableBtns" @click="lr_handleTableBtnClick"></l-table-btns>
    </l-table>
  </l-layout>
</template>

<script>
export default {
  name: "apiDialog",
  components: {},
  data() {
    return {
      // 表格
      columns: [
        { label: "接口名称", prop: "name", minWidth: "120" },
        { label: "接口连接", prop: "f_Url", minWidth: "240" },
        { label: "数据结构", prop: "Type", minWidth: "120" },
        { label: "类型", prop: "apiType", minWidth: "120" },
      ],
      tableBtns: [{ prop: "Edit", label: "选择" }],
      tableShowData: [],
      tableData: [],
    };
  },
  created() {},
  computed: {},
  methods: {
    setApiData(e) {
      //console.log(e);
      this.tableShowData = e;
    },

    lr_handleTableBtnClick(e) {
      //console.log(e);
      this.$emit("childForm", e);
    },
  },
};
</script>
